import 'package:json_annotation/json_annotation.dart';

part 'confirm_order_item.g.dart';

@JsonSerializable()
class ConfirmOrderItem extends Object {
  @JsonKey(name: 'spu_id')
  int spuId;

  @JsonKey(name: 'quantity')
  int quantity;

  @JsonKey(name: 'spu_name')
  String spuName;

  @JsonKey(name: 'spu_avatar')
  String spuAvatar;

  @JsonKey(name: 'sku')
  String sku;

  @JsonKey(name: 'sale_price')
  String salePrice;

  ConfirmOrderItem(
    this.spuId,
    this.quantity,
    this.spuName,
    this.spuAvatar,
    this.sku,
    this.salePrice,
  );

  factory ConfirmOrderItem.fromJson(Map<String, dynamic> srcJson) =>
      _$ConfirmOrderItemFromJson(srcJson);
}
